#!/usr/bin/node
//服务端
//
const http = require('http'),
      log  = console.log;

http.createServer((req, res) => {
  log(`${req.method}  ${req.url}  HTTP/${req.httpVersion}`);
  log(req.headers);
  log('');
  req.pipe(process.stdout);
  res.end('OK12345!');
}).listen(8080);

